from django.conf.urls import url, include
from appBook.models import mBook
from django.conf import settings
from rest_framework import routers, serializers, viewsets

# Serializers define the API representation.
class mBookSerializer(serializers.HyperlinkedModelSerializer):
    class Meta:
        model = mBook
        fields = ('name', 'author', 'image')

# ViewSets define the view behavior.
class mBookViewSet(viewsets.ModelViewSet):
    queryset = mBook.objects.all()
    serializer_class = mBookSerializer

